//测试-数组
//编译：g++ TestSequentialString.cpp ../../*/*/SequentialString.hpp ../../*/ExceptionDefinition.hpp -o test
#ifndef __TESTSEQUENTIALSTRING__CPP
#define __TESTSEQUENTIALSTRING__CPP

#include<iostream>
#include"../../DataStructure/String/SequentialString.hpp"
#include"../../DataStructure/ExceptionDefinition.hpp"

using namespace std;
using namespace NgSiuKei;

int main(void) {
    cout << "初始化" << endl;
    SequentialString str1, str2, str3;

    cout << "str1 = ";
    str1.assign("5555555555");
    str1.print();

    cout << "str2 = ";
    str2.assign("WWWWWWWWWW");
    str2.print();

    cout << "str1.compare(&str2) = " << str1.compare(&str2) << endl;

    str1.concat(&str2);
    str1.concat(&str1);
    str1.print();

    cout << "str1.getIndex(&str2, 0) = " << str1.getIndex(&str2, 0) << endl;
    
    str1.getSubstring(6, 10)->print();

    str3.assign("A");
    str1.print();
    str1.replace(&str2, &str3);
    str1.print();

    str1.assign("abcdefghi");
    str1.print();
    str1.insert(&str3, 2);
    str1.print();
    str1.remove(4, 3);
    str1.print();
    
    return 0;
}

#endif